package cm.tl.pms.webservice;

import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
import org.springframework.cache.interceptor.CacheResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableCaching
public class CacheConfig {
    @Bean
    public CacheManager cacheManager() {
        return new ConcurrentMapCacheManager(); // 这里使用ConcurrentMapCacheManager作为缓存管理器，也可以根据实际情况选择其他实现
    }

    @Bean
    public CacheResolver cacheResolver() {
        return new CustomCacheResolver();
    }
}